﻿using ExtBusiness.FlowOperation;
using System;
using System.Collections.Generic;
using System.Data;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;

public partial class Office_SmcgDdgyInfo : System.Web.UI.Page
{
    public string strHtml = "请先选图。。。";
    protected void Page_Load(object sender, EventArgs e)
    {
        if(!IsPostBack)
        {
            RequestFlowOperation rfoTemp = new RequestFlowOperation();
            DataTable dtSource = rfoTemp.GetSmcgDdgyInfo(Request["IID"]);

            if (dtSource.Rows.Count > 0)
            {
                strHtml = "<table style='width:100%' class='tab'>";
                strHtml += string.Format("<tr><td>订单编号:</td><td>{0}</td></tr>", dtSource.Rows[0]["appid"]);

                for (int i = 0; i < dtSource.Rows.Count; i++)
                {
                    DataRow drTemp = dtSource.Rows[i];
                    strHtml += string.Format("<tr><td colspan='2'>{0}</td></tr>", drTemp["DDGYXX"]);
                }
                strHtml += "</table>";
            }

            if (Request["act"] == "Print" || Request["act"] == "PrintView")
            {
                strHtml += "<script>window.print();</script>";
            }
        }
    }

}